<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>试卷维护</title>
<%@include file="/view/common/js-css.jsp" %>
</head>
<body>
	<div id="frameWrapper" class="frameWrapper">
		<div class="titlebar">
			<p>
				当前位置：试卷管理<span>/</span>试卷维护
			</p>
		</div>
		<div class="searchbar">
			<form method="post" action="">
				<div id="input">
					<div class="inputwraper">
						<span>试卷名称：</span> <input type="text" name="paperName"/>
					</div>
					<div class="inputwraper">
						<span>科目：</span> <input type="text" name="subjectName"/>
					</div>
					<div id="sub-btn">
						<input type="submit" value="搜素">
					</div>
					<div class="clear"></div>
				</div>
			</form>
		</div>
		<div id="table-wrap">
			<table border="1">
				<thead>
					<tr>
						<th>编号</th>
						<th>试卷名</th>
						<th>科目</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				<c:forEach items="${paging.list }" var="paper">
					<tr>
						<td>${paper.paper_id }</td>
						<td>${paper.paper_name }</td>
						<td>${paper.subject_name }</td>
						<td class="do"> <a href="${pageContext.request.contextPath }/PageServlet?command=scan&paperId=${paper.paper_id}"
							class="btn btn-update"><i class="fa fa-pencil"></i>查看试卷</a></td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
			<div id="paging">
				<a class="btn btn-getionfo" href="${pageContext.request.contextPath }/PageServlet?command=paperScan&currentPage=1" target="iframe">首页</a>
				<a class="btn btn-getionfo" href="${pageContext.request.contextPath }/PageServlet?command=paperScan&currentPage=${paging.currentPage-1<1?1:paging.currentPage-1 }" target="iframe">上一页</a>
				&nbsp;&nbsp;&nbsp;&nbsp;
				共<span>${paging.pageTotal } </span>页
				&nbsp;&nbsp;&nbsp;&nbsp;
				当前第<span>${paging.currentPage }</span>页
				&nbsp;&nbsp;&nbsp;&nbsp;
				<a class="btn btn-getionfo" href="${pageContext.request.contextPath }/PageServlet?command=paperScan&currentPage=${paging.currentPage+1>paging.pageTotal?paging.pageTotal:paging.currentPage+1 }" target="iframe">下一页</a>
				<a class="btn btn-getionfo" href="${pageContext.request.contextPath }/PageServlet?command=paperScan&currentPage=${paging.pageTotal}" target="iframe">末页</a>
			</div>
		</div>
	</div>
</body>
</html>